class Animal{
    public String name;
    public int age;
    public void eat (){
        System.out.println("eat");
    }
    public Animal(String name, int age){
        this.name = name;
        this.age = age;
    }
}

class Dog extends Animal{
    public  Dog(String name, int age){
        super(name, age);
    }
}

class Bird extends Animal{
    public String wing;
    public void fly (){
        System.out.println(name + "flu" + age + wing);
    }
    public void eat(){
        System.out.println("细嚼慢咽");
    }
    public  Bird(String name, int age, String wing){
        super(name, age);
        this.wing = wing;
    }
    public static void func(Animal name){
        System.out.println(name);
    }
}
public class Main {
    public static void main(String[] args) {
        //直接赋值
        Animal animal = new Bird("haha", 18, "自由飞翔");
        animal.eat();
    }
}



























